Difference of sets
The difference of sets A and B is the set of elements which belong to A but do not belongto B. We denote the difference of A and B by A – B or simply “A Minus B”.
A – B = {x : x ∈ A and x ∉ B}.
Example-1:
Let A = {1, 2, 3, 4, 5}; B = {4, 5, 6, 7}. Find A – B.
Solution:
Given A = {1, 2, 3, 4, 5} and B = {4, 5, 6, 7}. Only the elements which are in A but not in B should be taken
∴ A – B = {1, 2, 3}. Since 4, 5 are the elements in B they are not taken
Similarly for B – A, the elements which are only in B are taken
B – A = {6, 7} (4, 5 are the elements in A).
Note that A – B ≠ B – A
The Venn diagram of A-B is as shown.
Example-2:
Observe the following
Solution:
A = {3, 4, 5, 6, 7} ∴ n(A) = 5
B = {1, 6, 7, 8, 9} ∴ n(B) = 5
A ∪ B = {1, 3, 4, 5, 6, 7, 8, 9}∴n(A ∪ B) = 8
A ∩ B = {6, 7} ∴ n(A ∩ B) = 2
∴ n(A ∪ B) = 5 + 5 – 2 = 8
We observe that n(A ∪ B) = n(A) + n(B) – n(A ∩ B)